<?php
namespace Swiftx\Interfaces\Httpd;
use Swiftx\Interfaces\Application\Kernel as KernelInterface;

interface Kernel extends KernelInterface{


    /**
     * 处理一个 HTTP request.
     *
     * @param  Request  $request
     * @return Response
     */
    public function handle(Request $request):Response;

    /**
     * 执行请求生命周期的后续操作
     *
     * @param  Request  $request
     * @param  Response  $response
     * @return void
     */
    public function terminate(Request $request, Response $response);

}